main(b,l,n,s)
{
	unsigned long long t,i,j,c;
	char a[20];
	for(;~scanf("%llu%llu",&i,&j);printf("%llu\n",c))
	{
		t=i;
		for(i=c=0;i<=j;i+=pow(10,l-n-1))
		{
			sprintf(a,"%llu",i);
			l=strlen(a);
			
			for(b=n=0;n<l-1&&!b;)
			{
				s=a[n++];
				b=a[n]==s;
			}
			if(!b)c++;
		}
		for(i=0;i<t;i+=pow(10,l-n-1))
		{
			sprintf(a,"%llu",i);
			l=strlen(a);
			
			for(b=n=0;n<l-1&&!b;)
			{
				s=a[n++];
				b=a[n]==s;
			}
			if(!b)c--;
		}
	}
}
